import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';

import '../../../constants.dart';

class FullBtn extends StatelessWidget {
  final Function? toSign;
  final Function? toLogin;
  final String title;
  const FullBtn({
    Key? key,
    required this.toSign,
    required this.title,
    required this.toLogin,
  }) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Container(
        padding: const EdgeInsets.symmetric(vertical: 0.0, horizontal: 49.0),
        child: Column(
          children: [
            ElevatedButton(
              onPressed: toSign as void Function()?,
                  // () {
                // Navigator.push(
                //   context,
                //   MaterialPageRoute(
                //     builder: (context) {
                //       return const Scaffold();
                //     },
                //   ),
                // );
              // },
              style: ElevatedButton.styleFrom(
                backgroundColor: kPrimaryColor,
                elevation: 0,
              ),
              child: Container(
                padding: const EdgeInsets.symmetric(horizontal: 32.0),

                child: Row(
                  crossAxisAlignment: CrossAxisAlignment.end,
                  children: [
                    Image(
                      width: 24,
                      height: 24,
                      image: AssetImage('assets/icons/apple_logo.png'),
                      fit: BoxFit.fill,
                    ),
                    Spacer(),
                    Text(
                      'Sign in with Apple',
                      style: TextStyle(
                          color: Colors.white,
                          height: 1.4,
                          fontSize: 16,
                          textBaseline: TextBaseline.alphabetic

                      ),
                    ),
                    Spacer(),
                    SizedBox(
                        width: 24,
                        height: 24,
                      ),
                  ],
                ),
              ),
            ),
            const SizedBox(height: 32),
            ElevatedButton(
              onPressed: toLogin as void Function()?,
                // () {
                // Navigator.push(
                //   context,
                //   MaterialPageRoute(
                //     builder: (context) {
                //       return const Scaffold();
                //     },
                //   ),
                // );
              // },
              style: ElevatedButton.styleFrom(
                backgroundColor: kSecondaryColor,
                elevation: 0,
              ),
              child: Container(
                padding: const EdgeInsets.symmetric(horizontal: 32.0),

                child: Row(
                  crossAxisAlignment: CrossAxisAlignment.end,
                  children: [
                    Image(
                      width: 24,
                      height: 24,
                      image: AssetImage('assets/icons/electricity.png'),
                      fit: BoxFit.fill,
                    ),
                    Spacer(),
                    Text(
                      'Fast Login',
                      style: TextStyle(
                          color: Colors.white,
                          height: 1.4,
                          fontSize: 16,
                          textBaseline: TextBaseline.alphabetic

                      ),
                    ),
                    Spacer(),
                    SizedBox(
                      width: 24,
                      height: 24,
                    ),
                  ],
                ),
              ),
            ),

          ],
        )
    );

  }
}